//
//  NSAttributedString+ZTEmotion.h
//  AFNetworking
//
//  Created by 武得亮 on 2021/3/12.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


//@interface KZTextAttachment : NSTextAttachment
//@property (nonatomic,assign) NSRange  range;
//@property(nonatomic, strong) NSString *imageName;
//@property (nonatomic, strong) NSMutableAttributedString *attachText;
//
//
//@end


@interface NSAttributedString (ZTEmotion)

//-----------------------------------------------------实例方法-----------------------------------------------------
/*
 * 返回绘制NSAttributedString所需要的区域
 */
- (CGRect)boundsWithSize:(CGSize)size;

//-----------------------------------------------------静态方法-----------------------------------------------------
/*
 * 返回表情数组
 */
+ (NSArray *)emojiStringArray;

/*
 * 返回绘制文本需要的区域
 */
+ (CGRect)boundsForString:(NSString *)string size:(CGSize)size attributes:(NSDictionary *)attrs;

/*
 * 返回Emotion替换过的 NSAttributedString
 */
+ (NSAttributedString *)emotionAttributedStringFrom:(NSString *)string attributes:(NSDictionary *)attrs;

/*
 * 查找所有表情文本并替换
 */
+ (NSArray *)crazy_attachmentsForAttributedString:(NSMutableAttributedString *)attributedString;
+ (NSArray *)crazy_attachmentsForAttributedString1:(NSMutableAttributedString *)attributedString;

+ (NSMutableAttributedString *)crazy_emotionAttributedStringFrom:(NSMutableAttributedString *)string attributes:(NSDictionary *)attrs;

+ (NSString *)noEmotion_crazy_emotionAttributedStringFrom:(NSMutableAttributedString *)string attributes:(NSDictionary *)attrs;

@end


